package de.fmannan.addbook.common.fieldtypes;

import de.fmannan.addbook.domainmodel.IContact;

/**
 * This interface provides access to a modifiable n:1 or 1:1 association  
 * as is typically necessary to build generic field editors.
 * 
 * @author fmannan
 *
 */
public interface IOnePeerAssociationField extends IField {

    /**
	 * Get the current far side IContact item of the association.
	 * 
	 * @return Far side IContact item or null if association is empty.
	 */
    public IContact getValue();

    /**
	 * Set the far side IContact item of the association.
	 * 
	 * @param IContact
	 *            item to set at the far side or null is the association should
	 *            be unset.
	 */
    public void setValue(IContact value);

    /**
	 * Get the array of entities selectable as far side IContact items of the
	 * association.
	 */
    public IContact[] getSelectables();
    
    
}
